import request from "@/util/request";

export  default {
    //1.查询所有学生
    findStudents(){
        return request({
            url: '/student/list.do',
            method: 'get',
        })
    },
    //2.进行分页查询
    findByPage(page,pageSize){
        return request({
            url: `/student/findByPage.do?page=${page}&pageSize=${pageSize}`,
            method: 'get',
        })
    },
    //3.条件查询带分页
    search(page,pageSize,data){
        return request({
            url: `/student/search.do?page=${page}&pageSize=${pageSize}`,
            method: 'post',
            data
        //  data:studetSearch   key 和value相同时可以studetSearch 只写data
        })
    },
    // 4. 保存学生
    save(data){
        return request({
            url: '/student/save.do',
            method: 'post',
            data
        })
    }

}